package com.xand.jsonrpc;

import com.google.gson.Gson;

import com.google.gson.annotations.Expose;

public class JSONGenericRequest {
	@Expose
	private String serviceId;
	
	@Expose
	private String md5;
	
	@Expose
	private String req;
	
	public final String getServiceId() {
		return serviceId;
	}

	public final void setServiceId(String serviceId) {
		this.serviceId = serviceId;
	}

	public final String getMd5() {
		return md5;
	}

	public final void setMd5(String md5) {
		this.md5 = md5;
	}

	public final String getReq() {
		return req;
	}

	public final void setReq(String req) {
		this.req = req;
	}
	
	public final Object getRequest(Class clazz) {
		Gson gson = new Gson();
		
		Object ret = gson.fromJson(req, clazz);
		
		return ret;
	}
}
